package com.no.pokerclub.metamodel.beans;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import com.no.pokerclub.core.beans.BaseBean;
import com.no.pokerclub.metamodel.Member;
import com.no.pokerclub.metamodel.Membership;
import com.no.pokerclub.metamodel.User;

@Entity
public class MembershipBean extends BaseBean implements Membership {

	private Date date;
	private Member member;
	private User user;
	
	@Basic
	public Date getDate() {
		return date;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	@ManyToOne(cascade = {CascadeType.ALL},
			targetEntity=MemberBean.class)
	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}
	@ManyToOne(cascade = {CascadeType.ALL},
			targetEntity=UserBean.class)
	public User getUser() {
		return user;
	}

}
